<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
 
   response.setHeader("X-UA-Compatible", "IE=Edge");

 %>    
 <%@ include file="/WEB-INF/views/common/common.jsp"%>
<!doctype html>
<html lang="KR">
<head>
<meta charset="utf-8">
<title>게시글 삭제</title>
<link href="${resources}/include/css/jquery-ui.css" rel="stylesheet">


<style type="text/css">


#all_btn {width:775px;height:65px;border-bottom: 1px solid #ccc;margin-bottom: 15px;}
#fieldlist {width:775px;height:506px;background-color:white;margin:0 auto;}
#fieldlist ul li {float:left;}
#fieldlist ul li p {text-align:center; vertical-align:top;}


#fieldlist ul li .title { border:1px solid #666666; height:26px; }
#fieldlist ul li .title p { background:#666666; color:#fff; line-height:26px !important; }

#iden_num {width:80px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#title {width:150px;height:20px;border:1px solid #DEDEDE;}
#text_content {width:230px;height:20px;border:1px solid #DEDEDE;}
#type {width:100px;height:20px;border:1px solid #DEDEDE;}
#date {width:100px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#condition {width:40px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#check_box {width:60px;height:20px;border:1px solid #DEDEDE;}
label, p { line-height:20px !important; }
#content ul li { font-size:12px; line-height: 20px; }

.paging .hide {display:block; height: 0; width: 0; font-size: 0; line-height: 0; margin: 0; padding: 0; overflow:hidden;}
.paging{padding:19px; text-align:center;}
.paging a{display:inline-block; width:23px; height:23px; padding-top:4px; vertical-align:middle;}
.paging a:hover{text-decoration:underline;}
.paging .btn_arr{text-decoration:none;}
.paging .btn_arr, .paging .on{margin:0 3px; padding-top:0; border:1px solid #ddd; border-radius:30px; /* background:url(/front/img/com/btn_paging.png) no-repeat; */}
.paging .on{padding-top:1px; height:22px; color:#fff; font-weight:bold; background:#000;}
.paging .on:hover{text-decoration:none;}


.paging .first{background-position:left top;}
.paging .prev{background-position:-50px top;}
.paging .next{background-position:-100px top;}
.paging .last{background-position:-150px top;}
.paging .del {position:relative;left:330px;}


</style>



<script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });



   $(function() {
    $( "#datepicker2" ).datepicker();
  });
  </script>

<script type="text/javascript" >
	var contextPath= "<c:out value='${pageContext.request.contextPath}'/>";
	var cpage= "<c:out value='${pd.cpage}'/>";
	var totalPage= "<c:out value='${pd.totalPage}'/>";
	var board_cd= "<c:out value='${AdminDto.board_cd}'/>";
</script>
	
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/home/home.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.simplePagination.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/admin/admin.js"></script>
<link href="${pageContext.request.contextPath}/resources/css/simplePagination.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="${css}/admin.css">
<style type="text/css">
#input_profile {width:200px;height:40px; line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#change_profile {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#delete_profile {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;background-color:#eee;}
#delete_board {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#change_photo {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#input_home {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center; margin-top:5px;border-top: 1px solid #ccc;}

</style>
</head>

<script>
	setSelectBox("<c:out value='${AdminDto.board_type}'/>");
</script>

<body>
<div id="wrapper">
	<div id="header">
		<h2>게시글 삭제</h2>  
    </div>  <!-- header End -->

	<div id="content">
		<ul>
			<li>
			  <form id="menu" name="menu">
				   <div id="left">
					<%@ include file="/WEB-INF/views/common/leftmenu.jsp"%>
				   </div>
			   </form>
			</li>
			<li id="right" class="list">
				<form id="frm" name="frm"  method="post" action="/admin/upartdel.do" >
					<input type="hidden" name="cpage" value="${pd.cpage}">
					<input type="hidden" name="totalPage" value="${pd.totalPage}">
						<div id="all_btn">
							<p>
								<label for="select_title"> 제목/내용&nbsp;&nbsp;&nbsp; :</label>
								<select id="searchfl" name="searchfl" style="margin-right:75px;">
									<option value="1" <c:if test="${AdminDto.searchfl eq '1'}"> selected </c:if>> 제목 </option>
									<option value="2" <c:if test="${AdminDto.searchfl eq '2'}"> selected </c:if>> 내용  </option>
								</select>   
								내용입력 : <input type="text" id="searchct" name="searchct" style="margin-right:75px;width:120px" value ="${AdminDto.searchct}">
								날짜 : <input type="text" id="datepicker" name = "startdt" value = "${AdminDto.startdt}" style="width:100px"> ~ <input type="text" id="datepicker2" name = "enddt" value = "${AdminDto.enddt}" style="width:100px"> 
								<!-- <button id="button">검 색</button>  --> 
								<a  id="searchAtn" ><img src="/images/common/btn/btn_back.gif" alt="검색" /></a>
							</p>
						</div>    <!-- all_btn End -->

	<div id="fieldlist">

    <ul>
       <li>
		<div id="check_box" class="title">
		   <p> 체크박스 </p>
		</div>
	
		</li>
	    <li>
			<div id="type" class="title">
			 <p> 타   입 </p>
			</div>
		</li>
	
		<li>
		<div id="iden_num" class="title">
		  <p> 고유번호 </p>
		</div>
	    </li>
	
		<li>
		<div id="title" class="title">
	       <p> 제   목 </p>
		</div>
		</li>
	
	    <li>
		<div id="text_content" class="title">
		   <p> 내   용 </p>
		</div>
		</li>
	
	 
	    <li>
		<div id="date" class="title">
		   <p> 등록일  </p>
		</div>
	
		</li>
	
	    <li>
		<div id="condition" class="title">
		    <p> 상   태 </p>
		</div>
	    </li>
 

	</ul>




<c:forEach items="${list}" var="item" varStatus="status">
	<ul>
	
	    <li>
		<div id="check_box">
		  <p> ${item.article_no} <input type ="checkbox" id ="checkValue" name ="checkValue" value ="${item.article_no}"/></p>
		</div>
		</li>
	 	<li>
			<div id="type"><c:if test="${'1' eq item.board_type}">
																타로
							</c:if>
							<c:if test="${'2' eq item.board_type}">
																신점
							</c:if>
							<c:if test="${'3' eq item.board_type}">
																역학
							</c:if>
							<c:if test="${'4' eq item.board_type}">
																색채타로
							</c:if>	  
			 </div>
		</li>
		<li>
		<div id="iden_num"> ${item.board_cd} </div>
	    </li>
	
		<li>
		<div id="title"> ${item.title}   </div>
		</li>
	
	    <li>
		<div id="text_content">${item.content} </div>
		</li>
	
	  
	
	    <li>
		<div id="date">${item.regdate} </div>
		</li>
	
	    <li>
		<div id="condition">
				<c:if test="${'Y' eq item.del_yn}">
								삭제 됨
				</c:if>
				<c:if test="${'N' eq item.del_yn}">
								활성
				</c:if>	 	
		 </div>
	    </li>
	
	
	</ul>
</c:forEach>
	
  <div id="light-pagination" class="pagination"></div>
	
<script>
$('#light-pagination').pagination({
	
		items: 1, // Total number of items that will be used to calculate the pages.
		itemsOnPage: 1, // Number of items displayed on each page.
		pages:totalPage,  // If specified, items and itemsOnPage will not be used to calculate the number of pages.
		displayedPages:5, // How many page numbers should be visible while navigating. Minimum allowed: 3 (previous, current & next)
		edges:2, 
		currentPage: cpage, // Which page will be selected immediately after init.
		hrefTextPrefix: "?board_cd="+board_cd+"&cpage=", // A string used to build the href attribute, added before the page number.
		hrefTextSuffix: '', // Another string used to build the href attribute, added after the page number.
		prevText: "Prev", // Text to be display on the previous button.
		nextText: "Next", // Text to be display on the next button.
		cssStyle: "light-theme", // The class of the CSS theme.
		selectOnClick: true, // Set to false if you don't want to select the page immediately after click.
		onPageClick: function(pageNumber, event) {
			console.log("pageNumber="+pageNumber);
			return;
		},
		});
</script>     
	
	  
	<button id="ajaxDataBtn" >삭제</button>
	</div>
	


	
    </div>    <!-- content End -->
	</form>
	</li>  <!-- right End -->
	
	</ul>


	</div>  <!-- contents End -->


	 
 </div>    <!-- wrapper End -->

 <script src="${resources}/include/external/jquery/jquery.js"></script>
<script src="${resources}/include/js/jquery-ui.js"></script>

<script>
    $( "#datepicker" ).datepicker({
	inline: true,
	dateFormat:'yy-mm-dd'
});

 $( "#datepicker2" ).datepicker({
	inline: true,
	dateFormat:'yy-mm-dd'
});


 /* $( "#button" ).button();


$( "#selectmenu" ).selectmenu();

*/
</script>
  
 </BODY>


</HTML>
